package com.symaster.backups.frame.element.menu;

import com.formdev.flatlaf.ui.FlatButtonUI;
import lombok.Getter;
import lombok.Setter;

import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.ButtonUI;

/**
 * @author yinmiao
 * @version 2023/12/10
 */
@Getter
public class MenuItem extends JButton {

    @Setter
    private TopMenu.Item item;
    private final int index;

    public MenuItem(int index, String text) {
        super(text);
        this.index = index;
        setBorder(new EmptyBorder(5, 20, 5, 20));
        setUI((ButtonUI) FlatButtonUI.createUI(this));
    }
}
